﻿
namespace Ue.Qcdz.Domain.Articles
{
    public enum SortMethod
    {
        TimeDesc,
        TimeAsc,
        ViewAsc,
        ViewDesc
    }
    public class OrderType
    {
        private static string[] SortElement()
        {
           // return new string[]{             
           //  "DisplayOrder DESC,CreateOn DESC",
           //  "DisplayOrder DESC,CreateOn ASC",
           //  "DisplayOrder DESC,ClickCount ASC",
           //  "DisplayOrder DESC,ClickCount DESC",
           //  "DisplayOrder DESC,Id DESC"
           //};
            return new string[]{             
             "CreateOn DESC,DisplayOrder DESC",
             "CreateOn ASC,DisplayOrder DESC",
             "ClickCount ASC,DisplayOrder DESC",
             "ClickCount DESC,DisplayOrder DESC",
             "DisplayOrder DESC,Id DESC"
           };
        }

        public static string GetSortString(SortMethod sortEnum)
        {
            return SortElement()[(int)sortEnum];
        }
    }
}
